package com.skyline.base.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;
import com.skyline.base.model.Site;

/**
 * 地点的mapper
 * 
 * @author Jairus Chan
 * @version 0.1
 * */
public class SiteMapper implements RowMapper<Site> {

	private static final SiteMapper MAPPER = new SiteMapper();
	
	public static SiteMapper getMapper() {
		return MAPPER;
	}

	public Site mapRow(ResultSet rs, int rowNum) throws SQLException {
		Site s = new Site();
		s.setId(rs.getString("id"));
		s.setName(rs.getString("name"));
		s.setType(rs.getString("type"));
		s.setParent(rs.getString("parent"));
		return s;
	}
}
